<?
ob_start ();
header("Cache-control: public");
header("Content-type: text/html; charset=utf-8");
session_start();
//kad rodytu per kiek laiko sugeneravo koda
$m1 = explode(" ", microtime());$stime = $m1[1] + $m1[0];

include_once("priedai/conf.php");



####################### Puslapiu aprasymas ###################
if (isset($url['id']) && !empty($url['id']) && isnum($url['id'])) { $id = (int)$url['id']; } else { $id = null; }
if (isset($id) && isnum($id) && $id > 0) {
	if ($id >= 11 && $id<=18) { $page = "funkcijos"; }
     	elseif ($id == 5) { $page = "puslapiai/apie"; }
     	elseif ($id == 6) { $page = "puslapiai/siustis"; }
     	elseif ($id == 9) { $page = "puslapiai/nuorodos"; }
     	elseif ($id == 7) { $page = "puslapiai/codebin"; }
     	elseif ($id == 22) { $page = "puslapiai/straipsnis"; }
     	elseif ($id == 25) { $page = "puslapiai/frm"; }
     	elseif ($id == 40) { $page = "puslapiai/online"; }
     	elseif ($id == 41) { $page = "puslapiai/reg"; }
     	elseif ($id == 43) { $page = "puslapiai/logout"; }
     	elseif ($id == 44) { $page = "puslapiai/edit_user"; }
     	elseif ($id == 45) { $page = "puslapiai/pm"; }
     	elseif ($id == 46) { $page = "puslapiai/dievai/index"; }
     	elseif ($id == 47) { $page = "puslapiai/view_user"; }
     	elseif ($id == 48) { $page = "puslapiai/test"; }
     	elseif ($id == 49) { $page = "puslapiai/deze"; }
     	elseif ($id == 50) { $page = "puslapiai/naujienos"; }
     	elseif ($id == 66) { $page = "puslapiai/forumas"; }
     	elseif ($id > 999) { $sql = mysql_fetch_assoc(mysql_query("SELECT page FROM projektai WHERE id=" . escape($id) ."")); $page = "projektai/" . $sql['page']; }
	else { $page = "puslapiai/klaida"; }
}
else { $page = "puslapiai/naujienos"; }

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title><?=$conf['Pavadinimas']." - " .$page?></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="FW 8 DW 8 XHTML" />
<style type="text/css">
.main {
	background-color: #DDDDDD;
	border: 1px solid #0A3F67;
	border-left: 0px;
	background-image: url(images/mrcbug_r1_c2.gif);
	background-repeat: no-repeat;
	vertical-align: top;
	padding: 15px 15px 15px 15px;
}

.sonas {
	border: 1px solid Black;
	padding: 5px;
	background-image: url(images/left_bgr.jpg);
	background-repeat: no-repeat;
	width: 200px;
}
.title {
	color: #083D65;
	/*background-color: #999999;*/
	/*border-top: 1px solid #999999;*/
	/*border-right: 1px solid #999999;
	background-image: url(images/icons/bullet2.gif);
	background-repeat: no-repeat;
	background-position: left;*/
	background-image: url(images/title.gif);
	background-position: left;
	padding-left: 12px;
	padding-botom: 5px;
	vertical-align: middle;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: bold;
}
.vidus {
	background-color : white;
	font-size : 10px;
	font-weight : normal;
	font-family : Verdana, Arial, Helvetica, sans-serif, webdings, wingdings, zapf dingbats;
	/*border : 1px solid #999999;*/
	padding : 10px;
	margin-bottom : 10px;
	background-image: url(images/bgr.jpg);
	background-repeat: no-repeat;
}
.sarasas {
	border-bottom: 1px dashed Black;
}
fieldset {
	border : 1px solid #ccc;
	padding : 5px;
	margin : 5px;
}
.comment {
	font-family : Verdana, Arial, Helvetica, sans-serif, webdings;
	font-size : 9px;
	color : #999999;
	text-align : center;
}

body {
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 10px;
}
a, a:visited {
	color: #0A5087;
	text-decoration: none;
}
a:hover {
	color: #266493;
	text-decoration: underline;
}
h4:first-letter {
	color: #0A3F67;
	font-size: 40px;
	float: left;
}
h4 {
	color: Black;
	font-size: 12px;
}
code {
	font-size : 12px;
}
input, textarea, button, select {
	font-family : Verdana, Arial, Helvetica, sans-serif;
	font-size : 9px;
	color : #0A3F67;
	background-color : white;
	border : 1px solid #0A3F67;
	/*font-weight : bold;*/
	padding-left: 5px;
	background-image: url(images/bgr.jpg);
	background-repeat: no-repeat;
}
.middle {
	vertical-align : middle;
}
.ukryj {
	padding-bottom : 10px;
	padding-left : 30px;
	padding-top : 10px;
	padding-right : 30px;
}

.cytat {
	padding-left : 5px;
	color : #ffffff;
	background-color : #666;
	font-family : Arial, sans-serif, Verdana;
	font-size : 12px;
	margin-left : 10px;
}

#tabsJ {
	font-size: 12px;
	font-weight: bold;
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
}
#tabsJ ul {
	margin:0;
	padding:10px 10px 0 50px;
	list-style:none;
}
#tabsJ li {
	display:inline;
	margin:0;
	padding:0;
}
#tabsJ a {
	float:left;
	background: url(images/tableftJ.gif) no-repeat left top;
	margin:0;
	padding:0 0 0 5px;
	text-decoration:none;
}
#tabsJ a span {
	float:left;
	display:block;
	background: url(images/tabrightJ.gif) no-repeat right top;
	padding:5px 15px 4px 6px;
	color:#24618E;
}
    /* Commented Backslash Hack hides rule from IE5-Mac \*/
#tabsJ a span {float:none;}
    /* End IE5-Mac hack */
#tabsJ a:hover span {
	color:#FFF;
}
#tabsJ a:hover {
	background-position:0% -42px;
}
#tabsJ a:hover span {
	background-position:100% -42px;
}
#tabsJ #current a {
	background-position:0% -42px;
}
#tabsJ #current a span {
	background-position:100% -42px;
	color:#FFF;
}
</style>

<? if ($id == 46) { ?><script language="javascript" type="text/javascript" src="javascript/htmlarea/tiny_mce/tiny_mce.js"></script><? } ?>
<? if ($conf['Palaikymas'] == 1) { ?><script type="text/javascript" src="javascript/countdown.js" defer="defer"></script><? } ?>
<script language="javascript" src="javascript/pagrindinis.php" type="text/javascript"></script>

</head>

<body onload="setInterval('blinkIt()',500);">
<script language="javascript" src="javascript/boxover.js" type="text/javascript"></script>
<NOSCRIPT>
 <? klaida("Klaida","Prašome įjunkite javascript palaikymą"); ?>
</NOSCRIPT>

<table style="text-align: left; width: 90%;" border="0" cellpadding="0" cellspacing="0" align="center">
  <tbody>
    <tr>
      <td colspan="1" rowspan="2" class="sonas" valign="top">
      <h1>CodeRS</h1><a href="/"><img src="images/logo.png" alt="<?=$conf['Pavadinimas']?>" title="<?=$page?>" border="0" /></a><br /><br />
			<?php
			$sql_p = mysql_query("SELECT * FROM `panel` WHERE `align`='L' OR `align`='R' AND `show`='Y' ORDER BY `place` ASC");
			while ($row_p = mysql_fetch_assoc($sql_p)) {
				if (is_file("paneles/".$row_p['file'])) { include ("paneles/".$row_p['file']); }
				else { lentele("Klaida","Tokios paneles nera",$row_p['file']); }
			}
			unset($sql_p,$row_p);
			?>
		</td>
    </tr>
    <tr valign="top">
      <td class="main" style="height: 100%;" height="100%">
      <!-- <div class="title" style="background-color: transparent; color: Black; float: right; font-weight: normal;">Šiuo metu svetainėje: <?=$online?></div> -->
			<div id="tabsJ">
			<ul>
				<li <?=(!isset($url['id']))?'id="current"':''?>><a href="index.php"><span>Titulinis</span></a></li>
				<li <?=($url['id']==7)?'id="current"':''?>><a href="?id,7"><span>KodeBin</span></a></li>
				<li <?=($url['id']==6)?'id="current"':''?>><a href="?id,6"><span>Siųstis</span></a></li>
				<li <?=($url['id']==22)?'id="current"':''?>><a href="?id,22"><span>Straipsniai</span></a></li>
				<li <?=($url['id']==25)?'id="current"':''?>><a href="?id,25"><span>Forumas</span></a></li>
			</ul>
			<br/>
			</div>
		<div class="vidus">
		<?php
			include("paneles/sms_reklama.php");
			if (!isset($_SESSION['username'])) {
			 	lentele($conf['Pavadinimas'],$conf['Apie']);
			}
			include("".$page.".php");
		?>
		</div>
      </td>
    </tr>
  </tbody>
</table>
<hr />
<?php
$m2 = explode(" ", microtime());
$etime = $m2[1] + $m2[0];
$ttime = ($etime - $stime);
$ttime = number_format($ttime, 7);
if ($conf['Render'] == 1) { $ttime = "Sugeneruotas per: ".$ttime."s." ; }
else { $ttime = ''; }
copyright("$ttime\n".$conf['Copyright']."");
if (defined("LEVEL") && LEVEL > 20) { copyright("Mysql uzklausu: $mysql_num"); }
unset($extra,$meniu,$text,$ttime);
?>